home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 28
/
Aminet 28 (1998)(GTI - Schatztruhe)[!][Dec 1998].iso
/
Aminet
/
dev
/
amos
/
intuiextend16.lha
/
bonus
/
easylife
/
demos
/
FONT_NUM.AMOS
/
FONT_NUM.amosSourceCode
Wrap
AMOS Source Code
|
1992-02-26
|
683b
|
47 lines
'Easylife Example Program
'========================
'
'
'The procedure FONT_NUM returns the font number of the
'given fontname & size, and prevents that being removed
'from memory.
'
'0 is returned if the font cannot be accessed.
'
'
'
'
'
Procedure FONT_NUM[NAME$,SIZE]
'
'
On Error Goto FONT_NUM_ERROR
'
REALSIZE$=Mid$(Str$( Extension_16_0498(NAME$,SIZE))+" ",1,3)
Get Rom Fonts : A=0
Repeat
Inc A
Until(Mid$(Font$(A),1,Len(NAME$))=NAME$) and(Mid$(Font$(A),30,3)=REALSIZE$)
Goto FONT_NUM_RESUME
'
'
FONT_NUM_ERROR:
A=0
Resume FONT_NUM_RESUME
'
'
FONT_NUM_RESUME:
End Proc[A]
'
'
'
'
'
'
'
'Example Program:
'
'
FONT_NUM["Times.font",18]
Set Font Param
Text 0,40,"Hello World"